<?php /* Smarty version 2.6.20, created on 2013-05-25 01:50:41
         compiled from _core/_include/module/guidialogmodifydesign.tpl */ ?>
function GuiDialogModifyDesign() {
  
};

GuiDialogModifyDesign.instance = function(prefix, sample) {
  var gui = { product: document.getElementById(prefix + '_product_td'),
              quantity: document.getElementById(prefix + '_quantity_div'),
              attributes: [],
            };
  if (sample) {
    for (var i = 0, il = sample.attributes.length; i < il; i++) {
      gui.attributes[gui.attributes.length] = GuiDialogModifyDesign._attribute(prefix + '_' + i, sample.attributes[i]);
    }
  }
  return gui;
};

GuiDialogModifyDesign._attribute = function(prefix, sampleAttribute) {
  var gui = { name: document.getElementById(prefix + '_name_div'),
              options: []
            };
  for (var i = 0, il = sampleAttribute.options.length; i < il; i++) {
    gui.options[gui.options.length] = GuiDialogModifyDesign._option(prefix + '_' + i);
  }
  return gui;
};

GuiDialogModifyDesign._option = function(prefix) {
  return { name: document.getElementById(prefix + '_name_div') };
};